<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CEP13 ADMINISTRATOR</title>
	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript">
	$(document).ready(function(){

		$("#btn1").click(function(){

				$.post("checklogin.php", { 
				username: $("#username").val(), 
				password: $("#password").val()},
					function(result){

					},"script"
				);

			});
		});
	function loadmainpage()
	{
		window.location="news/index.php";
	}
	function displayerror(msg)
	{
		document.getElementById('div1').innerHTML = msg;
	}
	</script>
    <style>
	#main_container{
		width:320px;
		margin: 100px auto auto auto;
		background-color:#EEE;
		border:1px solid #ccc;
	}
	
	div.head /*toolbar*/ {
	background: #fafafa url(plugin/flexigrid/css/images/wbg.gif) repeat-x top;
	padding: 5px;
	border: 1px solid #ccc;
	border-bottom: 0px;	
	font-size:0.9em;
	}
	div.row{
		width:100%;
		overflow:auto;
	}
	div.topic{
		width:30%;
		float:left;
		background: #fafafa url(plugin/flexigrid/css/images/bg.gif) repeat-x top;
		padding:5px 10px 2px 10px;
		font-size:0.8em;
		height:20px;
	}
	
	div.input{
		width:60%;
		float:left;
	}
	
	div.button{
		width:80px;
		margin: 0 auto 0 auto;	
		padding-top:5px;
	}
	div.line{
		width:auto;
		height:0;
		border-bottom:1px solid #F0F0F0;
	    border-top:1px solid #E4E4E4;
	}
	
	#div1{
		color:#ff0000;
		font-size:0.9em;
		padding:5px;
	}
	</style> 
</head>

<body bgcolor="#CCCCCC">
<?php
	if( isset($_SESSION['admin_user_name']) )
	{
		echo "<script type=\"text/javascript\">";
		echo	"window.location=\"news/index.php\";";
		echo "</script>";
	}
?>
<div id="main_container">
	<div class="head">CEP13 ADMINISTRATOR : LOGIN</div>
    	<div class="row">
        	<div class="topic"><label for="username">Username :</label></div>
	        <div class="input"><input type="text" name="username" id="username" /></div>
        </div>
        <div class="line"></div>
        <div class="row">
	        <div class="topic">
				<label for="password">Password :</label>
    		</div>
        	<div class="input">
				<input type="password" name="password" id="password" />
    		</div>
        </div>
        <div class="line"></div>
        <div class="row">
        	<div class="button">
	        	<input type="button" name="button" id="btn1" value="Submit" style="width:80px"/>
            </div>
        </div>


    <div id="div1"></div>
</div>

  
</body>
</html>
